<?php

namespace App\Validate;

class ChannelRpcValidation extends BaseValidation
{
    // 调用案例 check支持自定义规则

    // make(AmountValidation::class)->check($this->request->all(),__FUNCTION__)

    //返回响应值的  ->response()

    //返回boole   ->get()

    //返回报错信息  ->getError()

    //验证规则
    protected $rule =[
        'recharge_type'=>'required|in:1,2',
        'operator_type'=>'required|in:1,2,3',
        'city_id'=>'required',
        'amount'=>'required',
        'merchant_no'=>'required',
        'ori_amount'=> 'required',
    ];
    //自定义验证信息
    protected $message = [

    ];
    
    //自定义场景
    protected $scene = [
        'channel_amount'=>"recharge_type,operator_type,city_id,amount",
        'channel_merchant_no'=>"merchant_no",
        'channel_amount_oli'=>"ori_amount,amount,recharge_type",
    ];
}
